Displaying Original Text in a User Interface with Translated Text

ABSTRACT

Methods, systems, and apparatus, including computer program products, for user interaction with machine translation. A user interface for receiving requests to translate text and/or documents from a first language text to a second language text. The translated text and/or document is displayed such that the first language text corresponding to a selected portion of the second language text can be accessed and displayed in the same user interface.

BACKGROUND

This specification relates generally to information systems.

User seeking to translate text or speech from one language into anotheroften accomplish this through the use of machine translation systems.Like translation done by humans, machine translation does not simplyinvolve substituting words in one language for words in another, but theapplication of complex linguistic knowledge.

Accurate translation requires an understanding the text, which includesan understanding of the situation and a variety of facts. Grammaticalrules can be memorized or programmed, but without real knowledge of alanguage, a computer simply looks up words in a dictionary and has noway to select between alternate meanings. Sometimes a name will bemisinterpreted as a word or the wrong sense will be chosen for a wordthat can be used in multiple senses. To provide users an understandingof how text was translated, user interfaces to machine translationservices often provide a way to view the untranslated text with thetranslated text so users can refer back to the original text. Typically,this is accomplished by interleaving the original text and translatedtext, providing the translated text in a separate window or frame.

SUMMARY

This specification describes systems and methods for translatingdocuments and/or text from a first source language to a second targetlanguage. In some implementations, a resource in a first language isspecified and a translated version of the resource in a second languageis provided. Access to the text of the original resource in the firstlanguage text is provided within the same interface that is displayingthe translated version of the resource. In some implementations, theaccess is provided via pop-ups (e.g., tooltips) which appear after auser points to text in the translated resource. The first language textcan be shown until the user ceases point to the text in the translatedresource.

In some implementations, the translated resource is reformatted in astructure appropriate for the second language text. In someimplementations, a navigation frame is generated to provide feedback tothe user, such as errors in the translation and/or formatting from thefirst language text to the second language text. In someimplementations, frames in the original resource are removed whenformatting the translated version of the document.

In some implementations, received text to be translated from a firstlanguage text to a second language text is received within a userinterface. The translated text is displayed in an output area within theuser interface. In some implementations, where the received text doesnot correspond with the first language text, an error message cansuggest an appropriate first language text.

In some implementations, a user interface is provided having an inputsection for receiving a location of a resource to be translated from afirst language text to a second language text, and a presentation areafor displaying a translated resource. In one example, predetermined textstructures within the translated resource are selectable to view thecorresponding first language text within the presentation area.

Advantages that can be seen in implementations described in thisspecification include one or more of the following. The reader of thetranslated text or resources is provided with easy access to theoriginal untranslated text. However, if the user does not need to seethe untranslated text, it is not displayed so it does not interfere withthe viewing of the translated text. This reduces the distractions causedby display the untranslated and translated text together, especially ifthe text directions for the untranslated and translated text aredifferent (e.g., English and Arabic), or if displaying the untranslatedtext interferes with the document's layout.

The details of one or more embodiments of the subject matter describedin this specification are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

DESCRIPTION OF DRAWINGS

FIG. 1 illustrates an example translation engine user interface.

FIG. 2 illustrates a resource in a first language.

FIG. 3 illustrates the resource of FIG. 2 translated to a secondlanguage.

FIG. 4 illustrates a the resource of FIG. 3 in which a portion oforiginal text is displayed.

FIG. 5 is a flow diagram of a method for requesting and receivingtranslations.

FIG. 6 is a flow diagram of a method for receiving and processingrequests to translate locations.

FIG. 7 illustrates an example translation engine user interfaceincluding text to be translated.

FIG. 8 illustrates the user interface of FIG. 7 displaying translationlanguage pairs.

FIG. 8 illustrates the user interface of FIG. 7 displaying translationlanguage pairs.

FIG. 9 illustrates the user interface of FIG. 7 displaying a translationin progress.

FIG. 10 illustrates the user interface of FIG. 7 displaying a translatedtext.

FIG. 11 illustrates the user interface of FIG. 7 displaying a suggestedtranslation language pair.

FIG. 12 is a flow diagram of a method for text translation.

FIG. 13 is a block diagram of a client and a translation engine.

Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION

FIG. 1 illustrates an example translation user interface 100. The userinterface 100 can be provided by a translation engine to a client userinterface, such as a web browser. Generally, a client is an instance ofa computer program on a general purpose computer that is capable ofpresenting a user interface provided by the translation engine. Theclient is also capable of accepting user interaction from the user andproviding it to the translation engine. A client can be instantiated onvarious mobile and tethered computing devices, for example, personalcomputers, workstations, mobile computers, laptop computers, electronicgames, media players, mobile phones, combinations of these, and othersuitable computing devices. A client can be implemented in software,firmware, hardware or combinations of these. The client and thetranslation engine can be instantiated on the same computing device oron separate computing devices connected by one or more wired or wirelessnetworks (e.g., the Internet), including a local area network or a widearea network. After the point changes to the indicator 304, the selectedtext is indicated by highlighting 308. A tooltip 306 graphical elementis displayed in close proximity to the indicator 304 that shows theoriginal text. In some implementations, the tooltip 306 indicates theoriginal language (e.g., English).

If the user moves the indicator 304 out of the sentence, the indicator304 changes back to a pointer 302 and an a onmouseout trigger is used toremove the tooltip 306. The Window.setTimeout function is used to set,e.g., 100 ms delay before removing the tooltip 306 after the trigger.The delay prevents rapid visual changes from occurring if the user movesthe pointer 302 over a long distance. If the user moves the pointer 302back to the previously selected sentence (or other portion of text) ormoves the pointer 302 into the tooltip 306 during the delay period, thetimeout is canceled. Thus is such that moving the pointer 302 across theempty space between lines of text or across the space between the textand the bubble does not cause the tooltip 306 to be removed.

By providing the original text in the form of a tooltip, which is asmall window of text which appears when the user hovers over thetranslation, the user interface provides access the original textquickly when necessary, without distracting the user with the originaltext when it is not necessary. Thus, a clean, intuitive user interfaceis provided for text and web page translation, as well as convenientselection of the translation language pair.

It is possible that not all web pages will translate and formatproperly. In some implementations, CSS (Cascading Style Sheets),JavaScript, or <iframe>content . . . </iframe> techniques are used togenerate a navigation frame, in order to provide feedback such asexplanations of errors that are causing the page not to be translatedproperly. In some implementations, frames that make up original web pageare removed when the translated page 300 is created by the translationengine.

FIG. 5 is a flow diagram of a method 500 for requesting and receivingtranslations. Initially, a resource to be translated is specified andsubmitted to a translation engine (step 502). As noted above, theresource to be translated can be specified in the form of a URL or otheridentifier, which can specify, e.g., a web page, a document, an image,or other resource. A translated and/or reformatted version of theresource is received from the translation engine (step 504). To displaythe original text corresponding to the translated text or a portion ofthe translated text, a portion of the translated text, as defined by thespan tags, is

The user interface 100 can be provided by a translation engine as anencoded resource such as a Hyptertext Markup Language (HTML) encodeddocument. As used in this specification, the term “resource” refers todigital data entities of every kind that can be identified, named,addressed or handled, in any way, in a computer or a data processingsystem. In general, the user interface can be encoded in a documentusing an alternative encoding, a combination of encodings or acombination of different resources and encodings. For example, the HTMLdocument can also contain client-side instructions encoded asJavaScript, which can be used to affect the user interface in responseto user input. The user interface can be configured by the translationengine. By configuration the user interface the translation enginespecifies what user interface elements are included in the encoded userinterface.

The user interface 100 contains user interface elements such as a textbox 102, in which text to be translated from a first source language(e.g., German) to a second target language (e.g., English) can bespecified, a drop-down list 104 and a translate button 106 which can beused to submit the translation request, as specified in the drop-downlist 104. For example, the translate button 106 can receive input (e.g.,from a computer mouse or other input device), and in response textwithin the text box 102 is submitted to the translation engine.

The user interface 100 can also provide options to request a translationof a web page or other resource from a first language to a secondlanguage. A Uniform Resource Locator (URL) of a web page or resource tobe translated can be specified in an input box 108, and a language totranslate to/from can be specified using a second drop-down list 110. Asecond translate button 112 can be used to submit the translationrequest. For example, the second translate button 112 can receive input(e.g., from a computer mouse or other input device), and in response,the web page contained at the specified URL is submitted to thetranslation engine.

FIG. 2 illustrates an example of a web page 200 in a first language(e.g., English). To translate the web page 200 to a second language(e.g., Arabic), a user enters the URL of the web page (e.g.,http://www.cnn.com) into the user interface input box 108 and selects ato/from translation language pair using the drop-down list 110. The userthen submits the request using the translate button 112. The web page200 is then translated into a second language, as selected by the userin the drop-down list 112.

FIG. 3 is the web page 200 as translated into an exemplary translatedweb page 300 where the user selected English to Arabic in the drop-downlist 110. The translated web page 300 is presented to the user in theuser interface after the user submits the web page 200 for translationby the translation engine. In the example translated web page 300, thesecond language (e.g., Arabic) is read from right-to-left, whereas thefirst language (e.g., English) is read from left-to-right. Accordingly,the structure of the translated page 300 is reformatted to be read fromright-to-left. In some implementations where the original text isleft-to-right, the style attribute of elements in the translated webpage are set to “direction: rtl; align: right” to affect the directionand alignment of text and tables. In some implementations, when thesecond language is read from left-to-right, the structure of theformatting of the translated page 300 can remain the same as theformatting of the web page 200.

In some implementations, each sentence in the translated version of anHTML document that defines the web page 300 is surrounded with span tagswith title attribute set to the untranslated version of that sentence.For example: <span title=“Untranslated sentence.”> Translatedsentence.</span>. Such an implementation causes a behavior in some webbrowsers, such as Internet Explorer and Mozilla Firefox, of displayingsuch text as a tooltip. Similar mechanisms can be used for otherdocument formats such as word processing formats, Portable Documentformat (PDF), and others. In some implementations, the translationengine delimits text structures such as words, paragraphs, or portionsof a page with span tags. In some implementations, the translationengine delimits two or more sentence fragments with span tags. Forexample, “This is a sentence. This is another.” can is surrounded byspan tags to provide access to the untranslated text of both sentencesat the same time.

To display a portion of the original text, a user can position a pointer302 close to a portion of the translated text using a mouse or otherpointing device. As shown in FIG. 4, moving the pointer 302 such that ithovers over the text for a predetermine period of time triggers theonmouseover JavaScript trigger of that sentence (or other portion oftext) onmouseover JavaScript trigger. The trigger uses Window.setTimeoutto establish, e.g., a 500 ms delay before changing the cursor from apointer 302 to a select text indicator 304. selected (step 506). Theoriginal text that corresponds to the selected translated text is thendisplayed in the user interface (step 508).

FIG. 6 is a flow diagram of a method 600 for receiving and processingrequests to translate resources. A location of the resource is receivedfrom in the form of, e.g., a URL or other identifier, and a translationlanguage pair (step 602). The location is accessed and a, e.g., web pageor document, at that address is retrieved. The text is translated from aspecified first language to a specified second language, and the pagestructure reformatted, if necessary (step 604). As part of thereformatting process, predetermined translated text structures (e.g.,words, sentences, paragraphs, tabular columns/rows) are delimited byspan tags with the title attribute set to the untranslated version ofthat sentence to induce a behavior in the client viewing the translatedlocation. The translated text and/or reformatted resource iscommunicated to the requestor (step 606).

FIG. 7 illustrates an example of the user interface 100 where text 114is entered into the text box 102 to be translated from a first languageto a second language, as specified in the drop-down box 104. As shown inFIG. 8, the user can specify the particular to/from translation languagepair by selecting the down arrow 116 (e.g., from a computer mouse orother input device) and supported translation language pairs are shownin the list 118. After selecting a translation language pair (e.g.,German to English), the request is submitted using the translate button106. As shown in FIG. 9, while the request is processed, the user canreceive feedback in the form of a status box 120. As shown in FIG. 10,translated text 122 can be provided in a pane next to the original text114 for rapid viewing. The translated text 122 can be provided to theuser interface 100 using Asynchronous JavaScript and XML (AJAX), wheresmall amounts of data are exchanged with a server, so that the userinterface 100 does not have to be reloaded each time the user makes arequest using the translate button 106. In other implementations, theoriginal and translated text can be displayed top-to-bottom.

FIG. 11 illustrates the user interface of FIG. 7 displaying a suggestedtranslation language pair. In FIG. 11, text 114 has been entered in alanguage that does not correspond to the selected translation languagepair. For example, the entered text 114 to be translated is in English,however, the drop down box 104 indicates a translation selection ofGerman to English. When translate button 106 is selected, thetranslation engine can determine that the selection in the drop down box104 is not appropriate for the entered text and can provide a suggestedtranslation language pair 124 that is more appropriate.

A button or other user interface element can be provided that a user canselect to cause the translated text 122 or a portion of it to be copiedinto the clipboard.

JavaScript code in the translated resource can instruct the userinterface to create a panel with fixed positioning near the translatedtext. In some implementations, the original text is displayed in thepanel allowing the user to select and copy the original text using amouse or other pointing device and edit commands provided by thebrowser. In some implementations, alternative translations for a phraseentered by a user are provided by the translation engine and displayedin the panel. In some implementations, JavaScript code instructs thebrowser to display a feedback mechanism in the panel allowing the userto rate the quality of the translation. In some implementations,JavaScript code instructs the browser to display a selection mechanismto chose between multiple translation language pair candidates.

In some implementations, formatting of the original text 114 can bepreserved in the translated text 122. For example, font attributes, newlines, tabs, and other formatting features can be applied to thetranslated text 122.

FIG. 12 illustrates a flow diagram of a method 1200 for texttranslation. Text is entered into an element of a user interface (step1202). The text is submitted to a translation engine with an indicationof a translation language pair (step 1204). Error detection can beperformed to determine if the translation language pair corresponds withthe entered text, and a status can be provided to the requestorindicating that the translation processes is proceeding (step 1206). Thetranslated text is received and presented in another element of the userinterface (step 1208).

FIG. 13 is a block diagram of a client 1320 and a translation engine1340. The translation engine 1340 is connected to one or more networks1310 such as the Internet and can communicate with various clients 1320that are also connected to the network 1310 (e.g., using a communicationprotocol such as HTTP (Hypertext Transport Protocol)). The communicationflow between the client 1320 and translation engine 1340 isbidirectional so that the translation engine 1340 receives information(e.g., text and/or an identification of resources to be translated) fromthe client and sends information (e.g., results in the form oftranslated text and/or resources) to the client 1320. In someimplementations, the translation engine 1340 implements rule-basedmethods to parse text from a source language to a target language.

The client 1320 includes a message receiver 1328 that facilitatescommunication with the network and can receive encoded user interfaceelements and translated items (e.g. encoded in an HTML document) fromthe translation engine 1340 through the network 1310. Messages areprocessed by the client to produce a model 1324 of the user interface.The model 1324 (e.g., the syntax tree of an HTML document) describes thecontent received by the message receiver 1328. The model 1324 is, inwhole or in part, presented in a user interface 1322 included with theclient 1320 (e.g., a display surface on a device, a drawing surface in aweb browser application). User input is received from a user inputprocessor 1330 that can receive input from an input device (e.g.,keyboard, touch screen, mouse, track pad, camera, microphone).

The user input processor 1330 allows for user interaction with the userinterface 1322. For example, input from the input processor 1330 can beused to specify a request to translate text and/or documents. Requestscan be encoded and provided to the translation engine 1340 through thenetwork 1310 by the message sender 1326.

Implementations of the functional operations described in thisspecification can be implemented in digital electronic circuitry, or incomputer software, firmware, or hardware, including the structuresdisclosed in this specification and their structural equivalents, or incombinations of one or more of them. Implementations can be realized asone or more computer program products, i.e., one or more modules ofcomputer program instructions encoded on a computer-readable medium forexecution by, or to control the operation of, data processing apparatus.The computer-readable medium can be a machine-readable storage device, amachine-readable storage substrate, a memory device, a composition ofmatter effecting a machine-readable propagated signal, or a combinationof one or more of them. The term “data processing apparatus” encompassesall apparatus, devices, and machines for processing data, including byway of example in a programmable processor, a computer, or multipleprocessors or computers. The apparatus can include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, or acombination of one or more of them. A propagated signal is anartificially generated signal, e.g., a machine-generated electrical,optical, or electromagnetic signal, that is generated to encodeinformation for transmission to suitable receiver apparatus.

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read-only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more storage devices for storing data, e.g.,magnetic, magneto-optical disks, or optical disks. However, a computerneed not have such devices. Moreover, a computer can be embedded inanother device, e.g., a mobile telephone, a personal digital assistant(PDA), a mobile audio player, a Global Positioning System (GPS)receiver, to name just a few. Computer-readable media suitable forstoring computer program instructions and data include all forms ofnon-volatile memory, media and memory devices, including by way ofexample semiconductor memory devices, e.g., EPROM, EEPROM, and flashmemory devices; magnetic disks, e.g., internal hard disks or removabledisks; magneto-optical disks; and CD-ROM and DVD-ROM disks. Theprocessor and the memory can be supplemented by, or incorporated in,special purpose logic circuitry.

While this specification contains many specifics, these should not beconstrued as limitations of what may be claimed, but rather asdescriptions of features specific to particular implementations. Certainfeatures that are described in this specification in the context ofseparate embodiments can also be implemented in combination in a singleembodiment. Conversely, various features that are described in thecontext of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombination and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the embodiments described above should not be understoodas requiring such separation in all embodiments, and it should beunderstood that the described program components and systems cangenerally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular implementations have been described and otherimplementations are within the scope of the following claims. Forexample, the actions recited in the claims can be performed in adifferent order and still achieve desirable results.

1. A method, comprising: communicating a request to translate a sourcedocument at a location from a first language text to a second languagetext; receiving a translated document containing a translation of thedocument into the second language text; and displaying the firstlanguage text that corresponds to a portion of the translated documentin a graphical element overlaying the translated document in response toa user pointing to the portion of the translated document.
 2. The methodof claim 1, further comprising: displaying the first language text aftera predetermined period of time has elapsed after the user points to theportion of the translated document; removing the display of the firstlanguage text after a second predetermined period of time has elapsedafter a user ceases to point to the portion of the translated document;and canceling the removal the display of the first language text if theuser again points to the portion of the translated document before thesecond predetermined period of time has elapsed.
 3. The method of claim1, further comprising displaying the first language text in thegraphical element in accordance with a title attribute of span tagsdelimiting the portion of the translated text.
 4. The method of claim 1,wherein the portion of the translated document is at least one of aword, a sentence or a paragraph.
 5. The method of claim 1, furthercomprising reformatting the translated document in a structureappropriate for the second language text.
 6. The method of claim 5,further comprising displaying the translated document based oninformation contained in style attributes associated with the secondlanguage text and graphical elements in the translated document.
 7. Themethod of claim 1, wherein the graphical element is a tooltip.
 8. A userinterface on a display of a computing device, comprising: an input areafor receiving a location of a document to be translated from a firstlanguage text to a second language text; and a presentation area fordisplaying a translated document in the second language text, whereinthe first language text that corresponds to a portion of the secondlanguage text is displayed in a graphical element within thepresentation area in response a user pointing to the portion of thesecond language text.
 9. The user interface of claim 8, wherein thefirst language text is displayed after a predetermined period of timehas elapsed after the user points to the portion of the second languagetext, and wherein the first language text display is removed after asecond predetermined period of time has elapsed after the user ceases topoint at the portion of the second language text.
 10. The user interfaceof claim 8, wherein the first language text is displayed in a tooltipover the second language text in the presentation area.
 11. The userinterface of claim 10, wherein the first language text is displayed inaccordance with a title attribute of span tags delimiting the portion ofthe second language text.
 12. The user interface of claim 8, wherein thetranslated document is displayed having a layout structure appropriatefor the second language text.
 13. The user interface of claim 8, furthercomprising a second input section for receiving text to be translatedfrom the first language text to the second language text, wherein theuser interface displays the second language text in an output sectionand error messages suggesting an appropriate first language text basedon the text received in the second input section.
 14. The user interfaceof claim 13, wherein formatting of the text received in the second inputsection is preserved in the second language text displayed in the outputsection.
 15. A computer readable medium storing instructions that uponexecution by a processing device cause the processing device to performoperations, comprising: receiving requests in a user interface totranslate a resource at a location from a first language text to asecond language text; communicating the requests to a translationengine; receiving a translated document in the second language textwherein predetermined portions of the second language text in thetranslated document are delimited by tags; displaying the translateddocument in the user interface; and displaying the first language textthat corresponds to one of the predetermined portions of the secondlanguage text in a graphical element overlaying the second language textin the user interface in response to a user pointing to the one of thepredetermined portions of the second language text.
 16. The computerreadable medium of claim 15, storing further instructions that uponexecution by the processing device cause the processing device toperform operations comprising: displaying the first language text in thegraphical element after a predetermined period of time has elapsed afterthe user points to the one of the predetermined portions of the secondlanguage text; and removing the first language text after a secondpredetermined period of time elapses.
 17. The computer readable mediumof claim 15, wherein the tags having a title attribute set to the firstlanguage text.
 18. The computer readable medium of claim 15, storingfurther instructions that upon execution by the processing device causethe processing device to perform operations comprising displaying thefirst language text in a tooltip over the second language text.
 19. Thecomputer readable medium of claim 15, storing further instructions thatupon execution by the processing device cause the processing device toperform operations comprising displaying a top panel area adjacent tothe translated document within the user interface.
 20. The computerreadable medium of claim 15, storing further instructions that uponexecution by the processing device cause the processing device toperform operations comprising: displaying an input region for receivingtext to be translated from the first language text to the secondlanguage text; displaying a output region for display the text in thesecond language text; and displaying an error identification region forproviding a suggested first language text based on the text received inthe input region.